<%@page import="com.wframe.framework.util.UploadUtil" %>
<%@ page language="java" pageEncoding="utf-8" %>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="w" %>
<%
    String path = request.getContextPath();
    request.setAttribute("fileserver", UploadUtil.getConfig().getDownserver());
%>

<form id="dataForm" action="/products/ProductPage@productList.page" method="post">
    <w:hidden bind="pageSize_"/>
    <w:hidden bind="pageNum"/>
    <w:hidden bind="bean.code"/>
    <w:hidden bind="bean.name"/>
    <w:hidden bind="bean.classid"/>
    <w:hidden bind="bean.status"/>
    <table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:true,
																							pageNum:<w:write bind="pageNum"/>,
																							pageSize:<w:write bind="pageSize_"/>,
																							total:<w:write bind="pagination.totalCount"/>,form:'dataForm'">
        <thead>
        <tr class="ui_th">
            <td width="35" align="center"><input type="checkbox" onclick="$selAllTbBoxs(this)"></td>
            <td width="40">ID</td>
            <td width="60">商品图片</td>
            <td width="110">商品编号</td>
            <td width="110">商品名称</td>
            <td width="100">生产厂家</td>
            <td width="60">规格</td>
            <td width="100">商品分类</td>
            <td width="60">总库存</td>
            <td width="60">状态</td>
            <td width="90">上架时间</td>
            <td width="170" align="center">操作</td>
        </tr>
        </thead>
        <tbody>
        <w:iterate id="info" bind="resultList_">
            <tr class="ui_td">
                <td align="center"><input type="checkbox" name="primaryKey_" value="<w:write bind="#info.id"/>"></td>
                <td><w:write bind="#info.id"/></td>
                <td><w:notEqual bind="#info.photoview" value=""><img
                        src="${fileserver}<w:write bind="#info.photoview"/>"
                        style="width:40px;height:30px;"></w:notEqual></td>
                <td><p style="width: 110px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><w:write bind="#info.code"/></p></td>
                <td><p style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><w:write bind="#info.name"/></p></td>
                <td><p style="width: 120px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><w:write bind="#info.B_chanjia"/></p></td>
                <td><p style="width: 100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><w:write bind="#info.B_guige"/></p></td>
                <td><p style="width: 100px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><w:write bind="#info.classname"/></p></td>
                <td><p style="width: 60px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><w:write bind="#info.totalamount"/></p></td>
                <td><font class="status<w:write bind="#info.status"/>"><w:write bind="#info.status"
                                                                                format="[待上架,已下架,已上架]"/></font></td>
                <td><p style="width: 90px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"><w:write bind="#info.publishtime" format="yyyy-MM-dd HH:mm"/></p></td>
                <td align="center">
                    <a href="javascript:void(0);" class="ui_btn marginR8"
                       onclick="showProduct(<w:write bind="#info.id"/>)">查看</a><a href="javascript:void(0);"
                                                                                  class="ui_btn marginR8"
                                                                                  onclick="editP                                                                          roduct(<w:write
                                                                                          bind="#info.id"/>)">编辑</a><a
                        href="javascript:void(0);" class="ui_btn marginR8"
                        onclick="delProduct(<w:write bind="#info.id"/>)">删除</a>
                </td>
            </tr>
        </w:iterate>
        </tbody>
    </table>
</form>